package com.ssy.lingxi.order.repository;

import com.ssy.lingxi.order.entity.BaseTradeProcessDO;
import com.ssy.lingxi.order.entity.PlatformTradeProcessDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * 平台后台 - 交易流程配置Jpa仓库
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-26
 */
@Repository
public interface PlatformTradeProcessRepository extends JpaRepository<PlatformTradeProcessDO, Long>, JpaSpecificationExecutor<PlatformTradeProcessDO> {
    boolean existsByProcess(BaseTradeProcessDO process);

    boolean existsByProcessAndIdNot(BaseTradeProcessDO process, Long id);
}
